Skip to content

Release 13.0.0 #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
Jul 13, 2023
Merged

Release 13.0.0 #458

merged 57 commits into from
Jul 13, 2023

Conversation

js2me
Copy link
Member

@js2me js2me commented Nov 15, 2022

BREAKING_CHANGE: disable support NodeJS 14.x
BREAKING_CHANGE: change swagger-typescript-api NodeJS "generateApi" function return type
BREAKING_CHANGE: remove rawModelTypes from output api configuration
feat: --custom-config <string> option (#503)
feat: --sort-routes option, ability to sort routes;
fix: critical bugs based with extract types and enums
fix: sort types option (sort was not correctly work with nested or extracted types)
fix: problems based with extracting enums;
fix: nullable enum with integer values (#543)
fix: generation enum numbers as strings one (#534)
chore: refactoring the axios imports
fix: non-object custom spec extensions (#500)
fix(docs): input instead of output in readme
internal: remove redundant internal scripts
internal: change process with using custom templates

interface GenerateApiOutput {
...
-  files: { name: string; content: string; declaration: { name: string; content: string } | null }[];
+  files: { fileName: string; fileContent: string; fileExtension: string }[];
...
}

internal: refactor schema parser code (preparing it for async code execution)
fix: problem with filtering primitive in complex types (#459)
feat: add discriminator property support (#456)
internal: prepare code + templates for async code execution (next plans)
fix: problems with dot in query params (hard fix) (#460)
feature: ability to send custom Ts output code translator to js. Example:

 const { Translator } = require("swagger-typescript-api/src/translators/translator");
 const { JavascriptTranslator } = require("swagger-typescript-api/src/translators/javascript");

 class MyTranslator extends Translator { // or use extends JavascriptTranslator
     translate({ fileName, fileExtension, fileContent }) {
         // format ts\js code with using this codeFormatter (prettier + ts import fixer)
         this.codeFormatter.format(fileContent)
         // config of the code gen process
         this.config.
         // logger
         this.logger.

         return [
             {
                 fileName,
                 fileExtension,
                 fileContent,
             }
         ]
     }
 }

js2me and others added 30 commits November 14, 2022 22:16
…or interfaces/types);

refactor: discriminator type schema parser (own file)
feat: improve discriminator type dev exp
fix: problem with dot in query params
fix: critical bugs based with extract types and enums
fix: sort types option (sort was not correctly work with nested or extracted types)
internal: change process with using custom templates
BREAKING_CHANGE: remove `rawModelTypes` from output api configuration
feat: ability to sort routes;
Signed-off-by: Sora Morimoto <[email protected]>
Signed-off-by: Sora Morimoto <[email protected]>
Update GitHub Actions workflow
to-long and others added 9 commits March 12, 2023 07:54
`signal` key has defined its key as optional, not necessarily the value even though this happens implicitly. No key means no value which translates to `undefined`:
```ts
    signal?: AbortSignal | null;
```

To support exactOptionalPropertyTypes it would have to be defined as:
```ts
    signal?: AbortSignal | null | undefined;
```

While you could say the key isn't optional (removing ?), which then requires an explicit undefined value:
```ts
    signal: AbortSignal | null | undefined;
```
That would require an explicit undefined being passed.

Given this key is part of TS definitions and module augmentation is overkill, just "oring" from undefined to an expected value (in this case null) solves the problem.

Replacing: #457
fix: onCreateRoute skip behaviour
# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	src/schema-parser/schema-parser.js
#	src/schema-parser/schema-utils.js
#	src/schema-routes/schema-routes.js
#	src/util/name-resolver.js
#	tests/spec/extract-enums/test.js
@inomn
Copy link

inomn commented May 8, 2023

Hi @js2me , any plans on finishing this release soon? Thanks.

@js2me js2me changed the title Next release [DRAFT] Release 13.0.0 Jul 13, 2023
@js2me js2me merged commit 9a55e7c into master Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants